package com.meritit.product.spi;

import com.sun.portal.container.PortletWindowContext;
import com.sun.portal.container.PortletWindowContextException;
import com.sun.portal.container.PortletWindowContextFactory;

import javax.servlet.http.HttpServletRequest;

public class PortletWindowContextFactoryImpl implements PortletWindowContextFactory {

    @Override
    public PortletWindowContext getPortletWindowContext(HttpServletRequest request) throws PortletWindowContextException {
        PortletWindowContext portletWindowContext = new PortletWindowContextImpl();
        portletWindowContext.init(request);
        return portletWindowContext;
    }

    @Override
    public PortletWindowContext getPortletWindowContext(HttpServletRequest request, String userID) throws PortletWindowContextException {
        PortletWindowContext portletWindowContext = new PortletWindowContextImpl(userID);
        portletWindowContext.init(request);
        return portletWindowContext;
    }
}
